// JavaScript Document
 var rownumber=1;
function addtr(){
 rownumber++;
 var obj=document.getElementById("work_experiencetable");
 var rows = obj.rows.length;
 if(rows>3)
 { 
 alert("最多添加三行");
 rownumber--;
 return;
 }
 var tr=obj.rows[1];
 var tr=obj.insertRow(rownumber);
// tr.setAttribute("height","10px");
 var td0=tr.insertCell(0);
 td0.setAttribute("align","center");
 td0.innerHTML = "<input type='text' style='width:90%;height:15px;' id='job"+rownumber+"' name='job"+rownumber+"'> ";
  var td1=tr.insertCell(1); 
 td1.setAttribute("align","center");
 td1.innerHTML = "<input type='text' style='width:90%;height:15px;' id='country"+rownumber+"' name='country"+rownumber+"'> ";
  var td2=tr.insertCell(2); 
 td2.setAttribute("align","center");
 td2.innerHTML = "<input type='text' style='width:90%;height:15px;' id='work_starttime"+rownumber+"' name='work_starttime"+rownumber+"' onclick='laydate()'> ";
  var td3=tr.insertCell(3); 
 td3.setAttribute("align","center");
 td3.innerHTML = "<input type='text' style='width:90%;height:15px;' id='work_endtime"+rownumber+"' name='work_endtime"+rownumber+"' onclick='laydate()'> ";
 var td3=tr.insertCell(4);                             
 td3.setAttribute("align","center");

 td3.innerHTML = "<p style='margin-top:0'><input type='button' style='background-color:#FFF'  onclick='deleteCurrentRow(this)' value='删除'></p>";

// newTr.cells[0].firstChild.value = newTr.rowIndex;
// document.getElementById("b1").disabled = newTr.rowIndex ==5 ;
}
 var rownumber1=1;
function par_add(){

 rownumber1++;
 var obj=document.getElementById("par_work_experiencetable");
 var tr=obj.rows[rownumber1];
  var rows = obj.rows.length;
 if(rows>3)
 { 
 alert("最多添加三行");
 rownumber1--;
 return;
 }
 var tr=obj.insertRow(rownumber1);
 var td0=tr.insertCell(0);
 td0.setAttribute("align","center");
 td0.innerHTML = "<input type='text' style='width:90%;height:15px;' id='par_job"+rownumber1+"' name='par_job"+rownumber1+"'> ";
  var td1=tr.insertCell(1); 
 td1.setAttribute("align","center");
 td1.innerHTML = "<input type='text' style='width:90%;height:15px;' id='par_country"+rownumber1+"' name='par_country"+rownumber1+"'> ";
  var td2=tr.insertCell(2); 
 td2.setAttribute("align","center");
 td2.innerHTML = "<input type='text' style='width:90%;height:15px;' id='par_work_starttime"+rownumber1+"' name='par_work_starttime"+rownumber1+"' onclick='laydate()'> ";
  var td3=tr.insertCell(3); 
 td3.setAttribute("align","center");
 td3.innerHTML = "<input type='text' style='width:90%;height:15px;' id='par_work_endtime"+rownumber1+"' name='par_work_endtime"+rownumber1+"' onclick='laydate()'> ";
 var td3=tr.insertCell(4);                             
 td3.setAttribute("align","center");
 //td3.innerHTML = "<input type='button'  onclick='deleteCurrentRow(this)' value='删除'>";
 td3.innerHTML+="<p style='margin-top:0px'><input type='button' style='background-color:#FFF'  onclick='deleteCurrentRow1(this)' value='删除'></p>";
}
 function deleteCurrentRow(obj){ 
 var obj1=document.getElementById("work_experiencetable");
 var rows = obj1.rows.length;
     var tr=obj.parentNode.parentNode.parentNode; 
    // var rows = obj.rows.length;
            var tbody=tr.parentNode;  
            if(rows>2)
                {         
                    tbody.removeChild(tr);  
                    rownumber--;
               }//多于两行时才可以删除
        }  
        
   function deleteCurrentRow1(obj){ 
 var obj1=document.getElementById("par_work_experiencetable");
 var rows = obj1.rows.length;
     var tr=obj.parentNode.parentNode.parentNode; 
    // var rows = obj.rows.length;
            var tbody=tr.parentNode;  
            if(rows>2)
                {         
                    tbody.removeChild(tr);  
                    rownumber1--;
               }//多于两行时才可以删除
        } 
//填写本科学历
        
function addbachelor(){
 
 var obj=document.getElementById("Iqualification");
 var rows = obj.rows.length;
if(rows>2)
 { 
 return;
 }
 var tr=obj.rows[1];
 var tr=obj.insertRow(2);
 var td0=tr.insertCell(0);
 td0.setAttribute("align","center");
 td0.innerHTML = "<select name='bachelor' style='width:99%;height:25px;;font-size:13px' ><option>本科学位 </option></select>";
 //td0.innerHTML = "<input type='text' style='width:90%;height:90%;font-size:13px' id='bachelor' name='bachelor'> ";
  var td1=tr.insertCell(1); 
 td1.setAttribute("align","center");
 td1.innerHTML = "<input type='text' style='width:90%;height:15px;' id='bachelormajor' name='bachelormajor'> ";
  var td2=tr.insertCell(2); 
 td2.setAttribute("align","center");
 td2.innerHTML = "<input type='text' style='width:90%;height:15px;' id='bachelorcountry' name='bachelorcountry' > ";
  var td3=tr.insertCell(3); 
 td3.setAttribute("align","center");
 td3.innerHTML = "<input type='text' style='width:90%;height:15px;' id='bachelorstarttime' name='bachelorstarttime' onclick='laydate()'> ";
 var td3=tr.insertCell(4);                             
 td3.setAttribute("align","center");

 td3.innerHTML = "<input type='text' style='width:90%;height:15px;' id='bachelorendtime' name='bachelorendtime' onclick='laydate()'>";

// newTr.cells[0].firstChild.value = newTr.rowIndex;
// document.getElementById("b1").disabled = newTr.rowIndex ==5 ;
}
function addparbachelor(){
 
 var obj=document.getElementById("parqualification");
 var rows = obj.rows.length;
if(rows>2)
 { 
 return;
 }
 var tr=obj.rows[1];
 var tr=obj.insertRow(2);
 var td0=tr.insertCell(0);
 td0.setAttribute("align","center");
 td0.innerHTML = "<select name='parbachelor1' style='width:99%;height:25px;;font-size:13px' ><option>本科学位 </option></select>";
 //td0.innerHTML = "<input type='text' style='width:90%;height:90%;font-size:13px' id='bachelor' name='bachelor'> ";
  var td1=tr.insertCell(1); 
 td1.setAttribute("align","center");
 td1.innerHTML = "<input type='text' style='width:90%;height:15px;' id='parbachelormajor' name='parbachelormajor1'> ";
  var td2=tr.insertCell(2); 
 td2.setAttribute("align","center");
 td2.innerHTML = "<input type='text' style='width:90%;height:15px;' id='parbachelorcountry' name='parbachelorcountry1' > ";
  var td3=tr.insertCell(3); 
 td3.setAttribute("align","center");
 td3.innerHTML = "<input type='text' style='width:90%;height:15px;' id='parbachelorstarttime' name='parbachelorstarttime1' onclick='laydate()'> ";
 var td3=tr.insertCell(4);                             
 td3.setAttribute("align","center");

 td3.innerHTML = "<input type='text' style='width:90%;height:15px;' id='parbachelorendtime' name='parbachelorendtime1' onclick='laydate()'>";

// newTr.cells[0].firstChild.value = newTr.rowIndex;
// document.getElementById("b1").disabled = newTr.rowIndex ==5 ;
}